<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>栏目管理</title>
<load href="__PUBLIC__/Css/admin_style.css"/>
<load href="__PUBLIC__/Js/jquery.js"/>
<load href="__PUBLIC__/Js/inc.js"/>
<style type="text/css">
<!--
.t1 {
	background-color: #FFEA93;
}
.t2 {
	background-color: #FFF3EE;
}

-->
</style>
<script>
var showdbs=function(){
	var server=$.trim($("#server").val());
	var username=$.trim($("#username").val());
	var password=$.trim($("#password").val());
	
	if(server==""){
	   alert("请输入服务器名称");
	   $("#server").focus();
	   return false;	
	}
	if(username==""){
	   alert("用户名不能为空");
	   $("#username").focus();
	   return false;	
	}
	$.ajax({
		type:"GET",
		cache:false,
		async:false,
		dataType:"html",
		data:"server="+server+"&username="+username+"&password="+password,
		url:"__ACTION__/action/ajax_get_dbs",
		success:function(msg){
			msg='<option value="0">请选择数据库</option>'+msg;
			$("#dbs").html(msg);
		}
	});
}
var showtables=function(){
   var server=$.trim($("#server").val());
   var username=$.trim($("#username").val());
   var password=$.trim($("#password").val());
   $.ajax({
		type:"GET",
		cache:false,
		async:false,
		dataType:"html",
		data:"server="+server+"&username="+username+"&password="+password+"&db="+$("#dbs").val(),
		url:"__ACTION__/action/ajax_get_tables",
		success:function(msg){
			msg='<option value="0">请选择数据表</option>'+msg;
			$("#tables").html(msg);
		}
	});
}
</script>
</head>

<body>
{//公共上部}
<!-- layout::Admin:Syscolumn:inc_top::0 -->
<table width="500"  border="1" cellpadding="0" cellspacing="0" class="table_class1">
<form id="form1" name="form1" method="post" action="__ACTION__/action/importsys">
  <tr>
    <td>服务器：</td>
    <td>
      <input type="text" name="server" id="server"  value="localhost"/>
    </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>用户名：</td>
    <td><input type="text" name="username" id="username"  value="root"/></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>密码：</td>
    <td><input type="text" name="password" id="password" onblur="showdbs();"  value="123456"/></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>数据库：</td>
    <td><select name="dbs" id="dbs" onchange="showtables();">
    </select></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>数据表：</td>
    <td><select name="tables" id="tables">
    </select></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="button" id="button" value="提交" /></td>
    <td>&nbsp;</td>
  </tr>
  </form>
</table>
</body>
</html>
